﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace HQHS.Library.Common.Factory
{
    public class ObjectId : IObjectId
    {
        // Fields
        private object _id;

        // Methods
        public ObjectId(object somethingUnique)
        {
            this._id = RuntimeHelpers.GetObjectValue(somethingUnique);
        }

        public override bool Equals(object obj)
        {
            bool flag2 = false;
            if (obj is ObjectId)
            {
                flag2 = this._id.Equals(RuntimeHelpers.GetObjectValue(((ObjectId)obj)._id));
            }
            return flag2;
        }

        public override int GetHashCode()
        {
            return this._id.GetHashCode();
        }

        // Properties
        public object Value
        {
            get
            {
                return this._id;
            }
        }
    }

}
